<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <el-form :inline="true" :model="formData" class="demo-form-inline">
        <el-form-item label="审批人">
            <el-input v-model="formData.user" placeholder="审批人"></el-input>
        </el-form-item>
        <el-form-item label="活动区域">
            <el-select v-model="formData.region" placeholder="活动区域">
                <el-option label="上海" value="shanghai"></el-option>
                <el-option label="北京" value="beijing"></el-option>
            </el-select>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="edit">编辑</el-button>
            <el-button type="primary" @click="save">保存</el-button>
        </el-form-item>
    </el-form>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
    //jquery $("#msg").html("zhangsna");
   var vue = new Vue({
        el: '#app',
        //业务数据
        data: function() {
            return {
                formData:{
                    user:null,
                    region:null
                }
            }
        },
        methods:{
            edit:function(){
                //从后台查询数据
                this.formData = {user:"李四",region:"beijing"}
            },
            save: function () {
                //jquery $("#formId").serialize(); name=zhangsna&sex=1
                console.log(this.formData)
            }
        }
    })
</script>
</html>
